﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using MyMV.hpmce;
using Microsoft.MediaCenter.UI;

namespace MyMV
{
    public class LibraryManagement
    {

        public static object[] t;
        public static int listcount;
        ArrayList r = new ArrayList();
        WebServices x = new WebServices();

        public LibraryManagement()
             
        {
             
            t = x.getMtv();
            listcount = t.Length;
            selectedIndex = new IntRangedValue();
            selectedIndex.MinValue = -1;
            selectedIndex.MaxValue = 20000;
            selectedIndex.Value = -1;
          
        }
        public static object[] MList
        {
            get
            {
                return t;
            }
            
        }

        public ArrayList MyData()
        {


            foreach (string y in t)
            {
                r.Add(y.Split('$')[0]);

            }
            return r;

        }
        //返回列表总大小
        public static int ListCount
        {
            get
            {
                return listcount;
            }

        }

        IntRangedValue selectedIndex;
        public IntRangedValue SelectedIndex
        {
            get
            {
                return selectedIndex;
            }
        }
    }
}
